import { http } from '@/utils/request'

// 电子票权益
export function getTicketInterest(ticketNo: string) {
  return http.request({
    url: `/small/myMemberCardAndTicket/getTicketInterest/${ticketNo}`,
    method: 'POST'
  })
}

// 电子票详情
export function getTicketDetail(ticketNo: string) {
  return http.request({
    url: `/small/myMemberCardAndTicket/getTicketDetail/${ticketNo}`,
    method: 'POST'
  })
}

// 智能卡权益
export function getMemberCardInterest(memberNumber: string) {
  return http.request({
    url: `/small/myMemberCardAndTicket/getMemberCardInterest/${memberNumber}`,
    method: 'POST'
  })
}

// 手环详情
export function getMemberCardDetail(memberNumber: string) {
  return http.request({
    url: `/small/myMemberCardAndTicket/getMemberCardDetail/${memberNumber}`,
    method: 'POST'
  })
}

// 绑定电子票
export function bingTicket(data: any) {
  return http.request({
    url: `/small/myMemberCardAndTicket/bingTicket`,
    method: 'POST',
    data
  })
}

// 绑定手环
export function bingMemberCard(data: any) {
  return http.request({
    url: `/small/myMemberCardAndTicket/bingMemberCard`,
    method: 'POST',
    data
  })
}

// 电子票核销记录
export function selectTicketWriteOffRecordList(params: any) {
  return http.request({
    url: `/small/myMemberCardAndTicket/selectTicketWriteOffRecordList/${params.no}`,
    method: 'GET',
    params
  })
}

// 电子票列表
export function selectMyTicketList(params: any) {
  return http.request({
    url: `/small/myMemberCardAndTicket/selectMyTicketList`,
    method: 'GET',
    params
  })
}

// 我的手环列表
export function selectMyMemberCardList(params: any) {
  return http.request({
    url: `/small/myMemberCardAndTicket/selectMyMemberCardList`,
    method: 'GET',
    params
  })
}

// 手环核销记录
export function selectMemberCardWriteOffRecordList(params: any) {
  return http.request({
    url: `/small/myMemberCardAndTicket/selectMemberCardWriteOffRecordList/${params.no}`,
    method: 'GET',
    params
  })
}
